package svn.project;

import java.awt.Component;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JPanel;

public class SVNGridBagLayout extends GridBagLayout{
	
	public SVNGridBagLayout() {
		constraints = new GridBagConstraints();
		constraints.fill = GridBagConstraints.BOTH;
		constraints.anchor = GridBagConstraints.EAST;
		constraints.weightx = 0;
		constraints.weighty = 0;
	}
	
	public void setLayout(JPanel panel) {
		GridBagLayout layout = new GridBagLayout();
		panel.setLayout(layout);
	}
	
	public void add(Component c, JPanel panel,int gridx, int gridy, 
			int gridwidth, int gridheight) {
		constraints.gridx = gridx;
		constraints.gridy = gridy;
		constraints.gridwidth = gridwidth;
		constraints.gridheight = gridheight;
		panel.add(c, constraints);
	}
	
	GridBagConstraints constraints;

}
